package com.yanqu.road.entity.activity.hsisland.data;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.DataStatus;
import com.yanqu.road.entity.FieldTypeAnnotation;

import java.util.Objects;

/**
 * 战场伤害记录表
 */
@FieldTypeAnnotation(tableName = "t_c_activity_hs_island_battle_field_damage_data")
public class HsIslandBattleFieldDamageData extends DataObject {

    @FieldTypeAnnotation(desc = "活动ID", select = true, update = true)
    private int activityId;

    @FieldTypeAnnotation(desc = "分组ID", select = true, update = true)
    private int groupId;

    @FieldTypeAnnotation(desc = "商会ID", select = true, update = true)
    private String unionId;

    @FieldTypeAnnotation(desc = "用户id")
    private long userId;

    @FieldTypeAnnotation(desc = "所属战场id")
    private long battleFieldId;

    @FieldTypeAnnotation(desc = "战场怪物id")
    private int monsterId;

    @FieldTypeAnnotation(desc = "总伤害")
    private long totalDamage;

    @FieldTypeAnnotation(desc = "攻击次数")
    private int times;

    @FieldTypeAnnotation(desc = "更新时间")
    private long updateTime;


    public HsIslandBattleFieldDamageData() {

    }

    public int getActivityId() {
        return activityId;
    }

    public void setActivityId(int activityId) {
        if (this.activityId != activityId) {
            this.activityId = activityId;
            setOp(DataStatus.Update);
        }
    }

    public int getGroupId() {
        return groupId;
    }

    public void setGroupId(int groupId) {
        if (this.groupId != groupId) {
            this.groupId = groupId;
            setOp(DataStatus.Update);
        }
    }

    public String getUnionId() {
        return unionId;
    }

    public void setUnionId(String unionId) {
        if (!Objects.equals(this.unionId, unionId)) {
            this.unionId = unionId;
            setOp(DataStatus.Update);
        }
    }

    public long getUserId() {
        return userId;
    }

    public void setUserId(long userId) {
        if (this.userId != userId) {
            this.userId = userId;
            setOp(DataStatus.Update);
        }
    }

    public long getBattleFieldId() {
        return battleFieldId;
    }

    public void setBattleFieldId(long battleFieldId) {
        if (this.battleFieldId != battleFieldId) {
            this.battleFieldId = battleFieldId;
            setOp(DataStatus.Update);
        }
    }

    public int getMonsterId() {
        return monsterId;
    }

    public void setMonsterId(int monsterId) {
        if (this.monsterId != monsterId) {
            this.monsterId = monsterId;
            setOp(DataStatus.Update);
        }
    }

    public long getTotalDamage() {
        return totalDamage;
    }

    public void setTotalDamage(long totalDamage) {
        if (this.totalDamage != totalDamage) {
            this.totalDamage = totalDamage;
            setOp(DataStatus.Update);
        }
    }

    public int getTimes() {
        return times;
    }

    public void setTimes(int times) {
        if (this.times != times) {
            this.times = times;
            setOp(DataStatus.Update);
        }
    }

    public long getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(long updateTime) {
        if (this.updateTime != updateTime) {
            this.updateTime = updateTime;
            setOp(DataStatus.Update);
        }
    }
}
